package com.lxy.aimin.mcp.client.config;


import org.springframework.ai.chat.client.ChatClient;
import org.springframework.ai.chat.client.advisor.MessageChatMemoryAdvisor;
import org.springframework.ai.chat.client.advisor.SimpleLoggerAdvisor;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/*
 *
 * @author 渣哥
 */
@Configuration
public class ChatClientConfig {



    @Bean
    public ChatClient dashScopeChatClient(ChatClient.Builder builder, ToolCallbackProvider tools) {
        return builder
                .defaultAdvisors(
                        new SimpleLoggerAdvisor()
                ).defaultToolCallbacks( tools)
                .build();
    }

}
